﻿<Window x:Class="Weather.Windows.WeatherLarge"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:Weather.Controls"
        xmlns:Properties="clr-namespace:Weather.Properties"
        xmlns:WeatherIcons="clr-namespace:Weather.WeatherIcons"
        Height="480" Width="300" WindowStyle="None" ResizeMode="NoResize" AllowsTransparency="True" Background="Transparent" FontWeight="Light"
        SourceInitialized="WindowSourceInitialized" Loaded="WindowLoaded" MouseMove="WindowMouseMove" MouseLeftButtonUp="WindowMouseLeftButtonUp" MouseEnter="ThisMouseEnter"
        MouseLeave="ThisMouseLeave">
    <Window.ContextMenu>
        <ContextMenu>
            <MenuItem Header="Demo" Visibility="Collapsed">
                <MenuItem Name="ClearItem" Header="Clear" Click="ClearItem_Click"/>
                <MenuItem Name="RainItem" Header="Rain" Click="RainItemClick"/>
                <MenuItem Name="LightningItem" Header="Lightning" Click="LightningItemClick"/>
            </MenuItem>
            <MenuItem Name="RefreshItem" Header="{x:Static Properties:Resources.Refresh}" Click="RefreshItemClick"/>
            <Separator />
            <MenuItem Name="PinItem" Header="{x:Static Properties:Resources.Pin}" IsCheckable="True" Click="PinItemClick"/>
            <MenuItem Name="TopMostItem" Header="{x:Static Properties:Resources.TopMost}" IsCheckable="True" Click="TopMostItemClick"/>
            <MenuItem Name="OptionsItem" Header="{x:Static Properties:Resources.OptionsItem}" Click="OptionsItemClick"/>
            <MenuItem Name="CloseItem" Header="{x:Static Properties:Resources.CloseItem}" Click="CloseItemClick"/>
        </ContextMenu>
    </Window.ContextMenu>
    <Window.RenderTransform>
        <ScaleTransform x:Name="Scale" ScaleX="1" ScaleY="{Binding ElementName=Scale, Path=ScaleX}"/>
    </Window.RenderTransform>
    <Window.TaskbarItemInfo>
        <TaskbarItemInfo x:Name="Taskbar"/>
    </Window.TaskbarItemInfo>
    <Window.Resources>
        <Storyboard x:Key="ShowVideoAnim">
            <DoubleAnimation Storyboard.TargetName="MediaElement" Storyboard.TargetProperty="Opacity" From="-1" To="1" Duration="0:0:2.5"/>
            <DoubleAnimation Storyboard.TargetName="WeatherIcon" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:2.5" BeginTime="0:0:1.5"/>
        </Storyboard>
        <Storyboard x:Key="HideVideoAnim">
            <DoubleAnimation Storyboard.TargetName="MediaElement" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:2.5" Completed="DoubleAnimationCompleted"/>
            <DoubleAnimation Storyboard.TargetName="WeatherIcon" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:2.5"/>
        </Storyboard>
        <Storyboard x:Key="MouseEnter">
            <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.3" FillBehavior="Stop" Completed="MouseEnterCompleted"/>
        </Storyboard>
        <Storyboard x:Key="MouseLeave">
            <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.3" FillBehavior="Stop" Completed="MouseLeaveCompleted"/>
        </Storyboard>
    </Window.Resources>
    <Grid Margin="0,45,0,0">
        <Rectangle RadiusX="10" RadiusY="10" Stroke="#717171" Opacity="0.7">
            <Rectangle.Fill>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Color="#666666" Offset="0"/>
                    <GradientStop Color="#212121" Offset="0.7"/>
                    <GradientStop Color="#212121" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Border ClipToBounds="True" CornerRadius="10,10,0,0" Margin="1,1,1,145">
            <Border.Background>
                <VisualBrush>
                    <VisualBrush.Visual>
                        <MediaElement Name="MediaElement" LoadedBehavior="Manual" Stretch="Fill" Opacity="0" MediaEnded="MediaElementMediaEnded"/>
                    </VisualBrush.Visual>
                </VisualBrush>
            </Border.Background>
        </Border>
        <StackPanel Name="TempGrid" VerticalAlignment="Center" Margin="15,-80,0,0" HorizontalAlignment="Left">
            <StackPanel.Effect>
                <DropShadowEffect Direction="315" ShadowDepth="1" BlurRadius="2"/>
            </StackPanel.Effect>
            <TextBlock Name="TemperatureTextBlock" Text="0°" Foreground="White" FontSize="54" Margin="0,0,0,-12"/>
            <TextBlock Name="TemperatureHLTextBlock" Text="0° / 0°" Foreground="White" FontSize="20"/>
        </StackPanel>
        <StackPanel Name="HWGrid" VerticalAlignment="Center" Margin="0,-80,15,0" HorizontalAlignment="Right" Visibility="Collapsed">
            <StackPanel Name="WindSpeedPanel" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,0">
                <Image Name="WindSpeedIcon" Source="/UIFramework.Weather;Component/Images/wind_lvl1.png" Width="42" Height="36" Margin="0,-10,-1,0" RenderOptions.BitmapScalingMode="HighQuality" Stretch="Fill"/>
                <TextBlock Name="WindSpeedValueTextBlock" Foreground="White" Text="25 mph" FontSize="16">
                        <TextBlock.Effect>
                            <DropShadowEffect Direction="315" ShadowDepth="1" BlurRadius="2" />
                        </TextBlock.Effect>
                </TextBlock>
            </StackPanel>
            <StackPanel Name="HumidityPanel" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,-8,0,0">
                <Image Name="HumidityIcon" Source="/UIFramework.Weather;Component/Images/humidity_lvl1.png" Width="16" Height="16" Margin="0,-10,3,-10" RenderOptions.BitmapScalingMode="HighQuality"/>
                <TextBlock Name="HumidityValueTextBlock" Foreground="White" Text="75%" FontSize="16">
                        <TextBlock.Effect>
                            <DropShadowEffect Direction="315" ShadowDepth="1" BlurRadius="2" />
                        </TextBlock.Effect>
                </TextBlock>
            </StackPanel>
        </StackPanel>
        <Image Name="WeatherIcon" Source="/UIFramework.Weather;Component/Images/weather_1.png" VerticalAlignment="Top" Margin="0,-60,0,0" Width="220"/>
        <!--<Grid Opacity="0">
            <WeatherIcons:SomeClouds x:Name="SomeClouds"  VerticalAlignment="Top" Margin="0,-90,0,0" Width="250"/>
            <WeatherIcons:Sun x:Name="Sun" VerticalAlignment="Top" Margin="0,-90,0,0" Width="250" MouseLeftButtonDown="SunMouseLeftButtonDown" MouseRightButtonDown="SunMouseRightButtonDown" />
        </Grid>-->
        <TextBlock Name="SetupLocationTextBlock" Text="{x:Static Properties:Resources.SetupLocation}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" Foreground="White" FontSize="24" Margin="10,-100,10,0" Visibility="Collapsed">
           <TextBlock.Effect>
              <DropShadowEffect Direction="315" ShadowDepth="1" BlurRadius="2"/>
           </TextBlock.Effect>
        </TextBlock>
        <StackPanel Name="WeatherGrid" VerticalAlignment="Bottom" Margin="0,0,0,150">
            <TextBlock Name="LocationTextBlock" Text="New York" Foreground="White" FontSize="24" HorizontalAlignment="Center">
                <TextBlock.Effect>
                    <DropShadowEffect Direction="315" ShadowDepth="1" BlurRadius="2"/>
                </TextBlock.Effect>
            </TextBlock>
            <Rectangle Height="1" Fill="Black" Opacity="0.6" SnapsToDevicePixels="True">
                <Rectangle.OpacityMask>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                        <GradientStop Color="#00000000" Offset="0"/>
                        <GradientStop Color="#00000000" Offset="0.1"/>
                        <GradientStop Color="#000000" Offset="0.5"/>
                        <GradientStop Color="#00000000" Offset="0.9"/>
                        <GradientStop Color="#00000000" Offset="1"/>
                    </LinearGradientBrush>
                </Rectangle.OpacityMask>
            </Rectangle>
            <Rectangle Height="1" Fill="Gray" Opacity="0.6" SnapsToDevicePixels="True">
                <Rectangle.OpacityMask>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                        <GradientStop Color="#00000000" Offset="0"/>
                        <GradientStop Color="#00000000" Offset="0.1"/>
                        <GradientStop Color="#000000" Offset="0.5"/>
                        <GradientStop Color="#00000000" Offset="0.9"/>
                        <GradientStop Color="#00000000" Offset="1"/>
                    </LinearGradientBrush>
                </Rectangle.OpacityMask>
            </Rectangle>
            <TextBlock Name="WeatherTextBlock" Text="Clear" Foreground="White" FontSize="20" HorizontalAlignment="Center" MaxWidth="280" TextTrimming="CharacterEllipsis">
                <TextBlock.Effect>
                    <DropShadowEffect Direction="315" ShadowDepth="1" BlurRadius="2" Opacity="0.5"/>
                </TextBlock.Effect>
            </TextBlock>
        </StackPanel>
        <ProgressBar Name="WeatherRefreshProgressBar" Height="30" VerticalAlignment="Bottom" IsIndeterminate="True" Style="{StaticResource WeatherRefreshProgressBarStyle}" Foreground="White" Visibility="Collapsed" Margin="0,0,0,144"/>
        <Grid Name="ForecastGrid" Height="135" VerticalAlignment="Bottom" Margin="0,0,0,10" SnapsToDevicePixels="True">
            <Rectangle Fill="#000000" Opacity="0.4"/>
            <Rectangle Height="1" Fill="#8d8d8d" VerticalAlignment="Top" Opacity="0.7"/>
            <Rectangle Height="4" Margin="0,1,0,0" VerticalAlignment="Top" Opacity="0.2">
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop Color="#000000" Offset="0"/>
                        <GradientStop Color="#00000000" Offset="1"/>
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <Grid Name="ForecastPanel">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="1"/>
                    <ColumnDefinition />
                    <ColumnDefinition Width="1"/>
                    <ColumnDefinition />
                    <ColumnDefinition Width="1"/>
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Controls:ForecastItem/>
                <Rectangle Grid.Column="1" Fill="#5e5e5e" Width="1" Opacity="0.8" Margin="0,1,0,0"/>
                <Controls:ForecastItem Grid.Column="2"/>
                <Rectangle Grid.Column="3" Fill="#878787" Width="1" Opacity="0.6" Margin="0,1,0,0"/>
                <Controls:ForecastItem Grid.Column="4"/>
                <Rectangle Grid.Column="5" Fill="#5e5e5e" Width="1" Opacity="0.8" Margin="0,1,0,0"/>
                <Controls:ForecastItem Grid.Column="6"/>
            </Grid>
        </Grid>
        <Image Source="/Resources/footer.png" VerticalAlignment="Bottom"/>
    </Grid>
</Window>
